package com.codermn.day720;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.InetAddress;
import java.net.URL;
import java.net.UnknownHostException;

/**
 * @author jxau_scf
 * @date 2021/7/20 - 11:40
 */
public class InterentTest {
    public static void main(String[] args) throws IOException {
//        InetAddress localHost = InetAddress.getLocalHost();
//        System.out.println(localHost);
        URL url = new URL("file:/C:\\Users\\lenovo\\Desktop\\config.txt");
        BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
        String readLine = null;
        while ((readLine = br.readLine())!=null){
            System.out.println(readLine);
        }
        br.close();

    }
}
